﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:WP7Contrib.View.Controls.Reader">

    <!-- ReaderControl style -->
    <Style TargetType="local:ReaderControl">
        <Setter Property="Width"
                Value="456" />
        <Setter Property="Height"
                Value="768" />
        <Setter Property="DefaultItemWidth"
                Value="456" />
        <Setter Property="DefaultItemHeight"
                Value="768" />
        <!-- ReaderView template -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ReaderControl">
                    <Canvas Name="LayoutRoot"
                            Background="{TemplateBinding Background}"
                            CacheMode="BitmapCache">

                        <StackPanel Name="BackgroundPanelHost"
                                    Orientation="Horizontal"
                                    CacheMode="BitmapCache">
                            <ContentPresenter Name="BackgroundPanel"
                                              Height="{TemplateBinding Height}"
                                              CacheMode="BitmapCache" />
                        </StackPanel>

                        <StackPanel Name="ItemsPanelHost"
                                    Orientation="Horizontal"
                                    CacheMode="BitmapCache">
                            <ItemsPresenter Name="ItemsPanel"
                                            CacheMode="BitmapCache" />
                        </StackPanel>

                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <!-- ItemsPanel template -->
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
